class WithdrawInfo {
  int id;
  int app_id;
  int user_id;
  String address;
  String link;
  int coin;
  double fee;
  double balance_before;
  double balance_remain;
  int status;
  String created_at;
  String updated_at;

  WithdrawInfo({
    required this.id,
    required this.app_id,
    required this.user_id,
    required this.address,
    required this.link,
    required this.coin,
    required this.fee,
    required this.balance_before,
    required this.balance_remain,
    required this.status,
    required this.created_at,
    required this.updated_at,
  });

  factory WithdrawInfo.fromJson(Map<String, dynamic> json) {
    return WithdrawInfo(
      id: json['id'],
      app_id: json['app_id'],
      user_id: json['user_id'],
      address: json['address'],
      link: json['link'],
      coin: json['coin'],
      fee: json['fee'].toDouble(),
      balance_before: json['balance_before'].toDouble(),
      balance_remain: json['balance_remain'].toDouble(),
      status: json['status'],
      created_at: json['created_at'],
      updated_at: json['updated_at'],
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'app_id': app_id,
      'user_id': user_id,
      'address': address,
      'link': link,
      'coin': coin,
      'fee': fee,
      'balance_before': balance_before,
      'balance_remain': balance_remain,
      'status': status,
      'created_at': created_at,
      'updated_at': updated_at,
    };
  }
}
